package com.unism.objType;

public enum ObjectInfo {// 实例对象类型编号
	PUMPWELL("机井",1), 
			WEDOUBLECONTROL("井电双控",2), 
			FERTILIZERTANK("施肥灌",3), 
			FILTER("过滤器",4),
			WEATHERSTATIONS("气象站",5),
			MOISTURESTATION("墒情站",6),
			WATERSTATION("水位站",7),
			NUTRIENTSTATION("养分站",8),
			ENVIRONMENTSTATION("环境站",9),
			OUTGROUNDPILE("出地桩",10),
			OUTDOORGATEWAYS("室外网关",11),
			MAIN_PIPE("主干管",12),
			SUB_PIPE("分干管",13),
			BRANCH_PIPE("支管",14),
			PUMST("首部",15),
			WATER_QUALITY("首部",17);
	private String objName;
	private Integer objType;
	
	
	private ObjectInfo(String objName, Integer objType) {
		this.objName = objName;
		this.objType = objType;
	}

	public static ObjectInfo valueOf(Integer objType) {
		for (ObjectInfo element : ObjectInfo.values()) {
			if (objType == element.getObjType()) {
				return element;
			}
		}
		return null;
	}
	
	public String getObjName() {
		return objName;
	}

	public void setObjName(String objName) {
		this.objName = objName;
	}

	public int getObjType() {
		return objType;
	}

	public void setObjType(Integer objType) {
		this.objType = objType;
	}
}
